<include file="public@header"/>
<style type="text/css">
    .table-bordered>thead>tr>th, .table-bordered>tbody>tr>th, .table-bordered>tfoot>tr>th, .table-bordered>thead>tr>td, .table-bordered>tbody>tr>td, .table-bordered>tfoot>tr>td {
            border:1px solid #232525;width: 50%;
        }

    .conn{
        width:100%;
        height:auto;
        overflow:hidden;
        background:#f3f3f3;
        margin-top:15px;
    }
    .conn ul{
        width:100%;
        height:auto;
        overflow:hidden;
        padding-left: 0px!important;
    }
    .conn ul li{
        width:100%;
        height:auto;
        overflow:hidden;
        margin-top:15px;
    }
    .conn_t{
        height:30px;
        overflow:hidden;
    }
    .conn_t p{
        font-size:18px;
        float:left;
        color:#666666;
        line-height: 30px;
    }
    .conn_t a{
        display:block;
        float:right!important;
        font-size:16px;
        float:left;
        line-height:30px;
        color:#4abde7;
        text-decoration: underline;
    }
    .conn_b{
        height:auto;
        overflow:hidden;
        background:#fff;
    }
    .conn_b div{
        height:auto;
        border-bottom:1px solid #e6e6e6;
        padding-top: 10px;
        padding-bottom: 10px;
        padding-left: 10px;
    }
    .conn_b div p{
        margin: 0;
        font-size:15px;
    }
    .conn_b div p img{
        float:right;
        width: 20px;
    }
    .conn_b div span{
        display:block;
        margin: 0;
        font-size:15px;
        color:#ff9900;
        margin-top:10px;
    }
</style>
</head>
<body>
<div class="wrap js-check-wrap">
    <input type="checkbox" name=""  checked="checked"  value="1" style="float: left;">含点评内容
    <span style="float: right;height:50px;padding: 15px 0px;">ID:{$Request.param.mytask_id}</span>
    <form method="post" class="js-ajax-form margin-top-20" action="{:url('template/listOrder')}">
        <table class="table table-hover table-bordered table-list" >
            <tbody>
                <foreach name="data['header']" item="vo" key="key">
                    <tr>
                        <td >{$key}</td>
                        <td >{$vo}</td>	
                    </tr>
                </foreach>
            </tbody>
        </table>
        <ul style=" margin-top: 10px;">
            <php> for($i=1;$i<=$data_template['template']['progress'];$i++){</php>
                <div class="conn_t">
                    <p>步骤{$i}：</p>
                </div>
                <div class="conn_b">
                    <foreach name="data.template" item="vo">
                        <foreach name="vo.content" item="v">
                            <if condition="$v['progressid'] eq $i">
                                <div>
                                    <p>{$v.question}</p>
                                    <if condition="is_array($v.reply)">
                                    	
                                        <foreach name="v.reply" item="vi">
                                           
                                            <if condition="$vi != ''">
                                            	<php>
                                                    $das=explode(',',$vi);

                                            	</php>
                                                <foreach name="das" item="vj">
                                                    <php>
                                                        $da=explode('|',$vj);
                                                    </php>
    	                                            <if condition="$da[0] === '0'">
    	                                            	<span>{$da[1]}</span>
    	                                            <elseif condition="$da[0] == 1"/>
    	                                                <img src="{$da[1]}" style="width:60%" />
    	                                            <elseif condition="$da[0] == 2"/>
    	                                            	<div class="tb-sp">
    														<video poster="{$da[1]}?vframe/jpg/offset/1" src="{$da[1]}" controls="controls" style="width:50%">
    														您的浏览器不支持 video 标签。
    														</video>
    													</div>
    	                                            <elseif condition="$da[0] == 3||$da[0] == 4"/>
    	                                                <php>$da=explode('-',$da[1]);</php>
    	                                                <span>音频文件:{$da[0]}</span>
    	                                            </if>
                                                </foreach>
	                                        </if>
                                        </foreach>
                                    <else/>
                                        <span>{$v.reply}</span>
                                    </if>
                                    <notempty name="$v.reply_evaluate">
                                        <span>评语:{$v.reply_evaluate}</span>
                                    </notempty>
                                  
                                </div>
                            </if>
                        </foreach>
                    </foreach>
                </div>
            <php>}</php>
        </ul>
        <table class="table table-hover table-bordered table-list">
            <tbody>
                <foreach name="data['footer']" item="vo" key="key">
                    <tr>
                        <td >{$key}</td>
                        <td >{$vo}</td>  
                    </tr>
                </foreach> 
            </tbody>  
        </table> 
      
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    
                    <button type="button" class="btn btn-primary js-ajax-submit" onclick="play({$Request.param.mytask_id},{$Request.param.user_id},{$Request.param.group_id})">导出</button>
                </div>
            </div>
        
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script type="text/javascript">
 
     function play(mytask_id,user_id,group_id){
        var checkbox = $('input:checked:checked').val();
        if(checkbox == 1){
            window.location.href = 'http://'+window.location.host+'/student/mytask/export/mytask_id/'+mytask_id+"/user_id/"+user_id+"/group_id/"+group_id+'/checkbox/'+checkbox;
        }else{
             window.location.href = 'http://'+window.location.host+'/student/mytask/export/mytask_id/'+mytask_id+"/user_id/"+user_id+"/group_id/"+group_id;
        }
        
    }
</script>
</body>
</html>